Discover select poll returned error, include the articles, news, trends, analysis and practical advice about select poll returned error on alibabacloud.com
With the full support of the 2.6 kernel to epoll, many articles and sample code on the network provide a message that using Epoll instead of the traditional poll can bring a performance boost to Web service applications. But most of the reasons for
SelectThe essence is to use 32-bit 32-bit integer, that is, 32*32 = 1024, And the FD value is 1-1024. When the FD value exceeds the 1024 limit, you must modify the fd_setsize. In this case, you can identify the FD in the 32 * max value range.
1 select function
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);1.1 parameter description the first parameter NFDs is the maximum descriptor value added to the fdset set by 1. fdset is
Source: http://www.cnblogs.com/sharra/archive/2010/12/30/1921287.html
Because you need to understand the principle of access to the underlying device, you need to understand the Access Mechanism of Linux devices, especially when dealing with a set
Transferred from: http://www.cnblogs.com/lanyuliuyun/p/5011526.htmlRecently a simple look at a handful of linux-3.10.25 kernel in Select/poll/epoll this several IO event detection API implementation. Make some records here.The basic principle is the
As in the first part of the previous article, these words are designed to help others or to clear their mind. Rather than the so-called source code analysis. To analyze the source code, or direct debug source code is the best, see no matter what
Recently, I have seen a simple implementation of the IO event detection API Select/poll/epoll in Linux linux-3.10.25 kernel. Make some records here.The basic principle is the same, the process is as follows
Call the FD corresponding struct
And the first part of the previous article, the text is to help others or their own ideas, rather than the so-called source analysis, want to analyze the source code, or direct debug source is the best, see any document and books are the worst.
The select () System Call provides a mechanism to synchronize multiple I/O:
# Include # Include # Include
Int select (int n,Fd_set * readfds,Fd_set * writefds,Fd_set * required TFDs,Struct timeval * timeout );
FD_CLR (int fd, fd_set * set
(The following comes from the web and its own summary, thanks again for the insights provided by the great gods on the Web)Before exploring Select poll Epoll We first need to know what is called multiplexing:Come down and explore why multiplexing is
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.